package com.gitee.melin.bee.core.jdbc.parser;

import com.gitee.melin.bee.core.jdbc.enums.DataSourceType;
import java.util.regex.Pattern;

public class ClickhouseURLParser extends AbstractMatcherURLParser {

    private static final Pattern URL_PATTERN = Pattern.compile(
            "jdbc:clickhouse:\\/\\/(?<host>[^:\\/]+)(:(?<port>\\d+))?\\/((?<instance>.*)?(\\?))?(?<options>.*)?");

    public ClickhouseURLParser() {
        super(URL_PATTERN, DataSourceType.CLICKHOUSE);
    }
}
